<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<title>Docs For Class Teeple_GlobalConfig</title>
	<link rel="stylesheet" type="text/css" id="layout" href="../media/layout.css" media="screen">
	<link rel="stylesheet" type="text/css" href="../media/style.css" media="all">
	<link rel="stylesheet" type="text/css" href="../media/print.css" media="print">
</head>

<body>
<div id="header">
	<div id="navLinks">
        
                                    
                                                                                        	        [ <a href="../classtrees_teeple.html">Class Tree: teeple</a> ]
            [ <a href="../elementindex_teeple.html">Index: teeple</a> ]
        		[ <a href="../elementindex.html">All elements</a> ]		
	</div>
	<div id="packagePosition">
		<div id="packageTitle2">teeple</div>
		<div id="packageTitle">teeple</div>
		<div id="elementPath"> &middot; </div>
	</div>
</div>

<div id="nav" class="small">
	<div id="packages">
		Packages:
					<p><a href="../li_teeple.html">teeple</a></p>
					<p><a href="../li_teeple-converter.html">teeple-converter</a></p>
					<p><a href="../li_teeple-filter.html">teeple-filter</a></p>
					<p><a href="../li_teeple-validator.html">teeple-validator</a></p>
			</div>

				<div id="index">
			<div id="files">
								Files:<br>
								<a href="../teeple/_ActionBase.php.html">		ActionBase.php
		</a><br>
			<a href="../teeple/_ActionChain.php.html">		ActionChain.php
		</a><br>
			<a href="../teeple/_ActiveRecord.php.html">		ActiveRecord.php
		</a><br>
			<a href="../teeple/_Bean.php.html">		Bean.php
		</a><br>
			<a href="../teeple/_ConfigUtils.php.html">		ConfigUtils.php
		</a><br>
			<a href="../teeple/_Container.php.html">		Container.php
		</a><br>
			<a href="../teeple/_Controller.php.html">		Controller.php
		</a><br>
			<a href="../teeple/_Converter.php.html">		Converter.php
		</a><br>
			<a href="../teeple/_ConverterManager.old.php.html">		ConverterManager.old.php
		</a><br>
			<a href="../teeple/_ConverterManager.php.html">		ConverterManager.php
		</a><br>
			<a href="../teeple/_DataSource.php.html">		DataSource.php
		</a><br>
			<a href="../teeple/_DBConn.php.html">		DBConn.php
		</a><br>
			<a href="../teeple/_DevHelper.php.html">		DevHelper.php
		</a><br>
			<a href="../teeple/_EntityGenerator.php.html">		EntityGenerator.php
		</a><br>
			<a href="../teeple/_ErrorHandler.php.html">		ErrorHandler.php
		</a><br>
			<a href="../teeple/_Exception.php.html">		Exception.php
		</a><br>
			<a href="../teeple/_FileUpload.php.html">		FileUpload.php
		</a><br>
			<a href="../teeple/_FileUtil.php.html">		FileUtil.php
		</a><br>
			<a href="../teeple/_Filter.php.html">		Filter.php
		</a><br>
			<a href="../teeple/_FilterChain.php.html">		FilterChain.php
		</a><br>
			<a href="../teeple/_misc---generateentity.php.html">		generateentity.php
		</a><br>
			<a href="../teeple/_GlobalConfig.php.html">		GlobalConfig.php
		</a><br>
			<a href="../teeple/_Request.php.html">		Request.php
		</a><br>
			<a href="../teeple/_Resource.php.html">		Resource.php
		</a><br>
			<a href="../teeple/_Response.php.html">		Response.php
		</a><br>
			<a href="../teeple/_Session.php.html">		Session.php
		</a><br>
			<a href="../teeple/_Smarty4Maple.php.html">		Smarty4Maple.php
		</a><br>
			<a href="../teeple/_Token.php.html">		Token.php
		</a><br>
			<a href="../teeple/_Transaction.php.html">		Transaction.php
		</a><br>
			<a href="../teeple/_TransactionManager.php.html">		TransactionManager.php
		</a><br>
			<a href="../teeple/_Util.php.html">		Util.php
		</a><br>
			<a href="../teeple/_Validator.php.html">		Validator.php
		</a><br>
			<a href="../teeple/_ValidatorManager.php.html">		ValidatorManager.php
		</a><br>
				</div>
			<div id="interfaces">
							</div>
			<div id="classes">
				Classes:<br>
								<a href="../teeple/TeepleActiveRecordException.html">		TeepleActiveRecordException
		</a><br>
			<a href="../teeple/Teeple_ActionBase.html">		Teeple_ActionBase
		</a><br>
			<a href="../teeple/Teeple_ActionChain.html">		Teeple_ActionChain
		</a><br>
			<a href="../teeple/Teeple_ActiveRecord.html">		Teeple_ActiveRecord
		</a><br>
			<a href="../teeple/Teeple_Bean.html">		Teeple_Bean
		</a><br>
			<a href="../teeple/Teeple_ConfigUtils.html">		Teeple_ConfigUtils
		</a><br>
			<a href="../teeple/Teeple_Container.html">		Teeple_Container
		</a><br>
			<a href="../teeple/Teeple_Controller.html">		Teeple_Controller
		</a><br>
			<a href="../teeple/Teeple_Converter.html">		Teeple_Converter
		</a><br>
			<a href="../teeple/Teeple_ConverterManager.html">		Teeple_ConverterManager
		</a><br>
			<a href="../teeple/Teeple_ConverterManagerOld.html">		Teeple_ConverterManagerOld
		</a><br>
			<a href="../teeple/Teeple_DataSource.html">		Teeple_DataSource
		</a><br>
			<a href="../teeple/Teeple_DBConn.html">		Teeple_DBConn
		</a><br>
			<a href="../teeple/Teeple_DevHelper.html">		Teeple_DevHelper
		</a><br>
			<a href="../teeple/Teeple_EntityGenerator.html">		Teeple_EntityGenerator
		</a><br>
			<a href="../teeple/Teeple_ErrorHandler.html">		Teeple_ErrorHandler
		</a><br>
			<a href="../teeple/Teeple_Exception.html">		Teeple_Exception
		</a><br>
			<a href="../teeple/Teeple_FileUpload.html">		Teeple_FileUpload
		</a><br>
			<a href="../teeple/Teeple_FileUtil.html">		Teeple_FileUtil
		</a><br>
			<a href="../teeple/Teeple_Filter.html">		Teeple_Filter
		</a><br>
			<a href="../teeple/Teeple_FilterChain.html">		Teeple_FilterChain
		</a><br>
			<a href="../teeple/Teeple_GlobalConfig.html">		Teeple_GlobalConfig
		</a><br>
			<a href="../teeple/Teeple_Request.html">		Teeple_Request
		</a><br>
			<a href="../teeple/Teeple_Resource.html">		Teeple_Resource
		</a><br>
			<a href="../teeple/Teeple_Response.html">		Teeple_Response
		</a><br>
			<a href="../teeple/Teeple_Session.html">		Teeple_Session
		</a><br>
			<a href="../teeple/Teeple_Smarty4Maple.html">		Teeple_Smarty4Maple
		</a><br>
			<a href="../teeple/Teeple_Token.html">		Teeple_Token
		</a><br>
			<a href="../teeple/Teeple_Transaction.html">		Teeple_Transaction
		</a><br>
			<a href="../teeple/Teeple_TransactionManager.html">		Teeple_TransactionManager
		</a><br>
			<a href="../teeple/Teeple_Util.html">		Teeple_Util
		</a><br>
			<a href="../teeple/Teeple_Validator.html">		Teeple_Validator
		</a><br>
			<a href="../teeple/Teeple_ValidatorManager.html">		Teeple_ValidatorManager
		</a><br>
				</div>
		</div>
	</div>

<div id="body">
	    		<h1>Class: Teeple_GlobalConfig</h1>
	<p style="margin: 0px;">Source Location: /GlobalConfig.php</p>
	

<div class="leftcol">
	<h3><a href="#class_details">Class Overview</a> <span class="smalllinenumber">[line <a href="../__filesource/fsource_teeple__GlobalConfig.php.html#a32">32</a>]</span></h3>
	<div id="classTree"><pre></pre>
</div>
	<div class="small">
	<p>GlobalConfig</p>
		<h4>Author(s):</h4>
	<ul>
			</ul>
	<h4>Version:</h4>
	<ul>
			</ul>

	<h4>Copyright:</h4>
	<ul>
			</li>
	</div>
</div>

<div class="middlecol">
	<h3><a href="#class_vars">Variables</a></h3>
	<ul class="small">
				<li><a href="../teeple/Teeple_GlobalConfig.html#var$_exportableConstPattern">$_exportableConstPattern</a></li>
				<li><a href="../teeple/Teeple_GlobalConfig.html#var$_overwriteValues">$_overwriteValues</a></li>
				<li><a href="../teeple/Teeple_GlobalConfig.html#var$_preferConstant">$_preferConstant</a></li>
				<li><a href="../teeple/Teeple_GlobalConfig.html#var$_sections">$_sections</a></li>
				<li><a href="../teeple/Teeple_GlobalConfig.html#var$_values">$_values</a></li>
			</ul>
	<h3><a href="#class_consts">Constants</a></h3>
	<ul class="small">
			</ul>
</div>
<div class="rightcol">
	<h3><a href="#class_methods">Methods</a></h3>
	<ul class="small">
				<li><a href="../teeple/Teeple_GlobalConfig.html#method__construct">__construct</a></li>
				<li><a href="../teeple/Teeple_GlobalConfig.html#methodexportConstants">exportConstants</a></li>
				<li><a href="../teeple/Teeple_GlobalConfig.html#methodgetSection">getSection</a></li>
				<li><a href="../teeple/Teeple_GlobalConfig.html#methodgetValue">getValue</a></li>
				<li><a href="../teeple/Teeple_GlobalConfig.html#methodhasValue">hasValue</a></li>
				<li><a href="../teeple/Teeple_GlobalConfig.html#methodimportSections">importSections</a></li>
				<li><a href="../teeple/Teeple_GlobalConfig.html#methodisConstName">isConstName</a></li>
				<li><a href="../teeple/Teeple_GlobalConfig.html#methodloadConstantsFromFile">loadConstantsFromFile</a></li>
				<li><a href="../teeple/Teeple_GlobalConfig.html#methodloadFromFile">loadFromFile</a></li>
				<li><a href="../teeple/Teeple_GlobalConfig.html#methodsetPreferConstant">setPreferConstant</a></li>
				<li><a href="../teeple/Teeple_GlobalConfig.html#methodsetValue">setValue</a></li>
				<li><a href="../teeple/Teeple_GlobalConfig.html#methodupdateValues">updateValues</a></li>
			</ul>
</div>

<div id="content">
<hr>
	<div class="contents">
	</div>

	<div class="leftCol">
    	<h2>Inherited Variables</h2>
		<h2>Inherited Constants</h2>
		</div>

	<div class="rightCol">
	<h2>Inherited Methods</h2>
		</div>
	<br clear="all">
	<hr>

	<a name="class_details"></a>
	<h2>Class Details</h2>
	<p align="center"><strong>GlobalConfig
</strong></p>
<p>プログラム全体の設定情報を扱うためのクラス  PHPの定数を透過的に扱うことが出来る</p><p>preferConstantによってPHP定数の優先順位が変わる  trueにすると    PHP定数 &gt; setValueで設定された値 &gt; importSectionsでまとめて読み込んだ値  falseにすると    setValueで設定された値 &gt; importSectionsでまとめて読み込んだ値 &gt; PHP定数</p>	<p class="small" style="color: #334B66;">[ <a href="#top">Top</a> ]</p>

	<hr>
	<a name="class_vars"></a>
	<h2>Class Variables</h2>
		<a name="var$_exportableConstPattern"></a>
	<p></p>
	<h4>$_exportableConstPattern = <span class="value">&nbsp;'/^[A-Z_][A-Z0-9_]*$/'</span></h4>
	<div class="indent">
		<p class="linenumber">[line <a href="../__filesource/fsource_teeple__GlobalConfig.php.html#a52">52</a>]</p>
		<h4>Tags:</h4>
<ul>
	<li><b>var</b> - 定数としてエクスポート可能な名前を表す正規表現</li>
</ul>
		<p><b>Type:</b> String</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_overwriteValues"></a>
	<p></p>
	<h4>$_overwriteValues = <span class="value">array()</span></h4>
	<div class="indent">
		<p class="linenumber">[line <a href="../__filesource/fsource_teeple__GlobalConfig.php.html#a42">42</a>]</p>
		<h4>Tags:</h4>
<ul>
	<li><b>var</b> - setValueで設定された値が保存される</li>
</ul>
		<p><b>Type:</b> String</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_preferConstant"></a>
	<p></p>
	<h4>$_preferConstant = <span class="value">&nbsp;false</span></h4>
	<div class="indent">
		<p class="linenumber">[line <a href="../__filesource/fsource_teeple__GlobalConfig.php.html#a57">57</a>]</p>
		<h4>Tags:</h4>
<ul>
	<li><b>var</b> - 定数を他の値に対して優先するか否か</li>
</ul>
		<p><b>Type:</b> String</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_sections"></a>
	<p></p>
	<h4>$_sections = <span class="value">array()</span></h4>
	<div class="indent">
		<p class="linenumber">[line <a href="../__filesource/fsource_teeple__GlobalConfig.php.html#a47">47</a>]</p>
		<h4>Tags:</h4>
<ul>
	<li><b>var</b> - importSectionsで読み込んだ値を、セクション単位でまとめるための配列</li>
</ul>
		<p><b>Type:</b> String</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_values"></a>
	<p></p>
	<h4>$_values = <span class="value">array()</span></h4>
	<div class="indent">
		<p class="linenumber">[line <a href="../__filesource/fsource_teeple__GlobalConfig.php.html#a37">37</a>]</p>
		<h4>Tags:</h4>
<ul>
	<li><b>var</b> - importSectionsで読み込まれた設定値が保存される</li>
</ul>
		<p><b>Type:</b> array</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>

	<hr>
	<a name="class_methods"></a>
	<h2>Class Methods</h2>
		<a name="methodloadConstantsFromFile"></a>
	<p></p>
	<h3>static loadConstantsFromFile</h3>
	<div class="indent">
		<p>
		<code>static boolean loadConstantsFromFile(

$filename)</code>
		</p>
	
		<p class="linenumber">[line <a href="../__filesource/fsource_teeple__GlobalConfig.php.html#a287">287</a>]</p>
		<p align="center"><strong>ファイルから設定を読み込み、  定数としてのエクスポートまでを行うstaticメソッド
</strong></p>
<h4>Tags:</h4>
<ul>
	<li><b>access</b> - public</li>
</ul>
		
	
	<h4>Parameters:</h4>
	<ul>
			<li>
		<span class="type"></span>
		<b>$filename</b> 
		- 
		</li>
		</ul>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>

	<a name="method__construct"></a>
	<p></p>
	<h3>__construct</h3>
	<div class="indent">
		<p>
		<code>Teeple_GlobalConfig __construct(
[bool
$preferConstant = false])</code>
		</p>
	
		<p class="linenumber">[line <a href="../__filesource/fsource_teeple__GlobalConfig.php.html#a66">66</a>]</p>
		<p align="center"><strong>コンストラクタ
</strong></p>
<h4>Tags:</h4>
<ul>
	<li><b>access</b> - public</li>
</ul>
		
	
	<h4>Parameters:</h4>
	<ul>
			<li>
		<span class="type">bool</span>
		<b>$preferConstant</b> 
		- 
		[optional] if true, constants have priority over                                          any other values.</li>
		</ul>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="methodexportConstants"></a>
	<p></p>
	<h3>exportConstants</h3>
	<div class="indent">
		<p>
		<code>String exportConstants(
)</code>
		</p>
	
		<p class="linenumber">[line <a href="../__filesource/fsource_teeple__GlobalConfig.php.html#a257">257</a>]</p>
		<p align="center"><strong>設定値を定数としてエクスポートする
</strong></p>
<h4>Tags:</h4>
<ul>
	<li><b>access</b> - public</li>
</ul>
		
	
	<h4>Parameters:</h4>
	<ul>
		</ul>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="methodgetSection"></a>
	<p></p>
	<h3>getSection</h3>
	<div class="indent">
		<p>
		<code>array getSection(
String
$sec)</code>
		</p>
	
		<p class="linenumber">[line <a href="../__filesource/fsource_teeple__GlobalConfig.php.html#a209">209</a>]</p>
		<p align="center"><strong>セクション単位で設定値を配列の形で得る
</strong></p>
<h4>Tags:</h4>
<ul>
	<li><b>access</b> - public</li>
</ul>
		
	
	<h4>Parameters:</h4>
	<ul>
			<li>
		<span class="type">String</span>
		<b>$sec</b> 
		- 
		</li>
		</ul>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="methodgetValue"></a>
	<p></p>
	<h3>getValue</h3>
	<div class="indent">
		<p>
		<code>mixed getValue(
String
$key, [mixed
$default = null])</code>
		</p>
	
		<p class="linenumber">[line <a href="../__filesource/fsource_teeple__GlobalConfig.php.html#a150">150</a>]</p>
		<p align="center"><strong>設定値を得る
</strong></p>
<p>定数として宣言されているか、  定数を優先するか、  上書きされているか、  等の要素を考慮して設定値は決まる</p><h4>Tags:</h4>
<ul>
	<li><b>access</b> - public</li>
</ul>
		
	
	<h4>Parameters:</h4>
	<ul>
			<li>
		<span class="type">String</span>
		<b>$key</b> 
		- 
		</li>
			<li>
		<span class="type">mixed</span>
		<b>$default</b> 
		- 
		</li>
		</ul>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="methodhasValue"></a>
	<p></p>
	<h3>hasValue</h3>
	<div class="indent">
		<p>
		<code>boolean hasValue(
String
$key, [boolean
$checkConst = false])</code>
		</p>
	
		<p class="linenumber">[line <a href="../__filesource/fsource_teeple__GlobalConfig.php.html#a176">176</a>]</p>
		<p align="center"><strong>値が設定されているかどうかを調べる
</strong></p>
<h4>Tags:</h4>
<ul>
	<li><b>access</b> - public</li>
</ul>
		
	
	<h4>Parameters:</h4>
	<ul>
			<li>
		<span class="type">String</span>
		<b>$key</b> 
		- 
		</li>
			<li>
		<span class="type">boolean</span>
		<b>$checkConst</b> 
		- 
		[optional] 定数をチェックするか</li>
		</ul>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="methodimportSections"></a>
	<p></p>
	<h3>importSections</h3>
	<div class="indent">
		<p>
		<code>void importSections(
array
$arr)</code>
		</p>
	
		<p class="linenumber">[line <a href="../__filesource/fsource_teeple__GlobalConfig.php.html#a115">115</a>]</p>
		<p align="center"><strong>配列を一括して取り込む  自動的にupdateValuesを呼び出し、保持されている値を更新する
</strong></p>
<h4>Tags:</h4>
<ul>
	<li><b>access</b> - public</li>
</ul>
		
	
	<h4>Parameters:</h4>
	<ul>
			<li>
		<span class="type">array</span>
		<b>$arr</b> 
		- 
		</li>
		</ul>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="methodisConstName"></a>
	<p></p>
	<h3>isConstName</h3>
	<div class="indent">
		<p>
		<code>String isConstName(
String
$key)</code>
		</p>
	
		<p class="linenumber">[line <a href="../__filesource/fsource_teeple__GlobalConfig.php.html#a274">274</a>]</p>
		<p align="center"><strong>定数としてエクスポート可能な名称か調べる
</strong></p>
<h4>Tags:</h4>
<ul>
	<li><b>access</b> - public</li>
</ul>
		
	
	<h4>Parameters:</h4>
	<ul>
			<li>
		<span class="type">String</span>
		<b>$key</b> 
		- 
		</li>
		</ul>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="methodloadFromFile"></a>
	<p></p>
	<h3>loadFromFile</h3>
	<div class="indent">
		<p>
		<code>boolean loadFromFile(
String
$filename)</code>
		</p>
	
		<p class="linenumber">[line <a href="../__filesource/fsource_teeple__GlobalConfig.php.html#a237">237</a>]</p>
		<p align="center"><strong>INIファイルから設定を読み込む
</strong></p>
<h4>Tags:</h4>
<ul>
	<li><b>access</b> - public</li>
</ul>
		
	
	<h4>Parameters:</h4>
	<ul>
			<li>
		<span class="type">String</span>
		<b>$filename</b> 
		- 
		</li>
		</ul>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="methodsetPreferConstant"></a>
	<p></p>
	<h3>setPreferConstant</h3>
	<div class="indent">
		<p>
		<code>void setPreferConstant(
boolean
$bool)</code>
		</p>
	
		<p class="linenumber">[line <a href="../__filesource/fsource_teeple__GlobalConfig.php.html#a77">77</a>]</p>
		<p align="center"><strong>定数を優先するか
</strong></p>
<h4>Tags:</h4>
<ul>
	<li><b>access</b> - public</li>
</ul>
		
	
	<h4>Parameters:</h4>
	<ul>
			<li>
		<span class="type">boolean</span>
		<b>$bool</b> 
		- 
		</li>
		</ul>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="methodsetValue"></a>
	<p></p>
	<h3>setValue</h3>
	<div class="indent">
		<p>
		<code>void setValue(
mixed
$key, mixed
$value, [boolean
$autoUpdate = false])</code>
		</p>
	
		<p class="linenumber">[line <a href="../__filesource/fsource_teeple__GlobalConfig.php.html#a194">194</a>]</p>
		<p align="center"><strong>値を設定する  このメソッドで設定した値は  $_overwriteValuesとして独自に管理される
</strong></p>
<h4>Tags:</h4>
<ul>
	<li><b>access</b> - public</li>
</ul>
		
	
	<h4>Parameters:</h4>
	<ul>
			<li>
		<span class="type">mixed</span>
		<b>$key</b> 
		- 
		</li>
			<li>
		<span class="type">mixed</span>
		<b>$value</b> 
		- 
		</li>
			<li>
		<span class="type">boolean</span>
		<b>$autoUpdate</b> 
		- 
		[optional]                   if ture, call updateValues() after overwriting</li>
		</ul>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="methodupdateValues"></a>
	<p></p>
	<h3>updateValues</h3>
	<div class="indent">
		<p>
		<code>void updateValues(
)</code>
		</p>
	
		<p class="linenumber">[line <a href="../__filesource/fsource_teeple__GlobalConfig.php.html#a127">127</a>]</p>
		<p align="center"><strong>保持されている値を更新する
</strong></p>
<h4>Tags:</h4>
<ul>
	<li><b>access</b> - public</li>
</ul>
		
	
	<h4>Parameters:</h4>
	<ul>
		</ul>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>

	<hr>
	<a name="class_consts"></a>
	<h2>Class Constants</h2>
	</div>
	<div id="credit">
		<hr>
		Documentation generated on Mon, 26 Apr 2010 08:59:50 +0900 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
	</div>
</div>
</body>
</html>